package com.hx.zhg.web.controller.user;

import com.hx.zhg.web.controller.BaseController;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import java.security.Principal;

/**
 * Created by zhenghegong on 2020/4/17.
 */
@RestController
@RequestMapping("/users")
public class UsesController extends BaseController {

    private static final Logger log = LoggerFactory.getLogger(UsesController.class);

    Logger logger = LoggerFactory.getLogger(UsesController.class);

    @RequestMapping(value = "/current", method = RequestMethod.GET)
    public Principal getUser(Principal principal) {
        logger.info(">>>>>>>>>>>>>>>>>>>>>>>>");
        logger.info(principal.toString());
        logger.info(">>>>>>>>>>>>>>>>>>>>>>>>");
        return principal;
    }

}
